<template>
    <div>
        <h2>我是子组件</h2>
        <p>{{ childrenMessage }}</p>
    </div>

</template>
<script setup>
import { onUnmounted,onBeforeUnmount } from 'vue';
const childrenMessage='子组件'

onBeforeUnmount(() => {
    console.log('子组件卸载前');
}),

onUnmounted(()=>{
    console.log('子组件卸载后');
})


</script>